# -*- encoding: utf-8 -*-
"""
@File    : 访客.py
@Time    : 2020/10/27 21:09
@Author  : lluyao
@Email   : lluyao61@163.com
@Software: PyCharm
"""
def add_username(name):
    with open("guest.txt","a+",encoding="utf-8") as f:
        f.write(name)
        f.write("\n")

username = input("请输入用户名：")
add_username(username)